package com.example.studentportrait.controller.frontend.teacher;

import com.example.studentportrait.domain.ResponseResult;
import com.example.studentportrait.domain.entity.CompanyInternship;
import com.example.studentportrait.domain.entity.CompetitionAuthenticate;
import com.example.studentportrait.domain.entity.Item;
import com.example.studentportrait.service.CompanyInternshipService;
import com.example.studentportrait.service.CompetitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/teacher")
public class CompanyInternshipController {

    @Autowired
    CompanyInternshipService companyInternshipService;

    /**
     * 教师端查询实习列表
     * @param pageNum
     * @param pageSize
     * @param status
     * @return
     */
    @GetMapping("/companyInternshipList")
    public ResponseResult companyInternshipList(Integer pageNum, Integer pageSize, Integer status){
        return companyInternshipService.companyInternshipList(pageNum,  pageSize,  status);
    }

    /**
     * 教师端审核实习
     * @param companyInternship
     * @return
     */
    @PutMapping("/reviewCompanyInternshipById")
    public ResponseResult<CompanyInternship> reviewCompanyInternshipById(@RequestBody CompanyInternship companyInternship){
        return companyInternshipService.reviewCompanyInternshipById(companyInternship);
    }
}
